Skip to content

Conversation

@truittjanney
Copy link

My changes:

  • React Native 82 file changes
  • Tested and working on iOS and Android

Android Testing.webm
Screenshot 2025-11-07 at 4 47 50 PM

@truittjanney
Copy link
Author

Simulator.Screen.Recording.-.iPhone.16.Pro.-.2025-11-07.at.17.06.21.mp4

Copy link
Member

@iBotPeaches iBotPeaches left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Concerned since there is no change outside of the /example folder that this change will not be resolved - #133

Please review the library upgrade to RN82 as well as the example app.

@truittjanney truittjanney requested a review from ian-wd November 13, 2025 15:44
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR upgrades React Native from version 0.76.7/0.80.0 to 0.82.0, updating dependencies across the project and example app. The changes include modifications to permission handling logic, test mocking strategies, and build configurations for both iOS and Android platforms.

Key changes:

  • Updated React Native and related dependencies to version 0.82.0
  • Modified permission handling to return raw result instead of boolean comparison
  • Refactored test mocks to use simplified React Native module mocking
  • Updated example app to use react-native-safe-area-context library

Reviewed Changes

Copilot reviewed 16 out of 20 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
package.json Updated React Native and related dependencies from 0.76.7 to 0.82.0, added babel preset and transform ignore patterns
example/package.json Updated example app dependencies to 0.82.0, added safe-area-context library, updated Node engine requirement to >=20
src/handlePermissions.tsx Changed return value from boolean comparison to raw permission result
src/tests/handlePermissionsGranted.test.tsx Simplified mock structure, changed mock return to boolean true
src/tests/handlePermissionsDenied.test.tsx Simplified mock structure, changed mock return to boolean false
example/src/App.tsx Refactored to use SafeAreaProvider and SafeAreaView from external library, added AppWrapper component
example/ios/Podfile.lock Updated all React Native iOS dependencies from 0.80.0 to 0.82.0
example/android/build.gradle Updated build tools and SDK versions to 36
example/android/gradle/wrapper/gradle-wrapper.properties Updated Gradle from 8.14.1 to 9.0.0
example/android/app/src/main/java/.../MainApplication.kt Simplified ReactHost initialization using new API pattern
tsconfig.json Added exclude paths for example, lib, and node_modules
babel.config.js Added TypeScript and Flow presets with test environment configuration

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

);

return granted === PermissionsAndroid.RESULTS.GRANTED;
return granted;
Copy link

Copilot AI Nov 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change from return granted === PermissionsAndroid.RESULTS.GRANTED to return granted introduces a breaking API change. The function previously returned a boolean, but now returns a PermissionStatus string ('granted', 'denied', 'never_ask_again'). This will break existing code that expects a boolean. Consider either: (1) keeping the boolean comparison for backward compatibility, or (2) explicitly documenting this as a breaking change with migration guidance.

Suggested change
return granted;
return granted === PermissionsAndroid.RESULTS.GRANTED;

Copilot uses AI. Check for mistakes.
GRANTED: 'granted',
DENIED: 'denied',
},
request: jest.fn(() => Promise.resolve(true)),
Copy link

Copilot AI Nov 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The mock returns true (a boolean), but PermissionsAndroid.request() in React Native 0.82 returns a PermissionStatus string ('granted', 'denied', or 'never_ask_again'), not a boolean. The mock should return Promise.resolve('granted') to accurately reflect the actual API behavior.

Suggested change
request: jest.fn(() => Promise.resolve(true)),
request: jest.fn(() => Promise.resolve('granted')),

Copilot uses AI. Check for mistakes.
GRANTED: 'granted',
DENIED: 'denied',
},
request: jest.fn(() => Promise.resolve(false)),
Copy link

Copilot AI Nov 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The mock returns false (a boolean), but PermissionsAndroid.request() in React Native 0.82 returns a PermissionStatus string ('granted', 'denied', or 'never_ask_again'), not a boolean. The mock should return Promise.resolve('denied') to accurately reflect the actual API behavior.

Suggested change
request: jest.fn(() => Promise.resolve(false)),
request: jest.fn(() => Promise.resolve('denied')),

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants